const express = require('express')
const router = express.Router();
const {LoginController}=require('../controller/user')
const {queryMysql}=require('../utils/queryMysqlUtil')

//登录验证
router.post("/login",LoginController)
router.get("/ping",(request, response)=>{
  response.json({
    code:0,
    msg:"ok",
    data:null
  })
})
router.get("/test",(request, response)=>{
    const {queryStr}=request.body
    queryMysql(queryStr).then(res=>{
        response.json(res)
    }).catch((err)=>{
        response.json(err)
    })
})

module.exports=router


